Category : logging

I am using newrelic infrastructure agent to send my logs to newrelic but having an issue when multi-line logs are generated. I tried newrelic blogs https://newrelic.com/blog/how-to-relic/parse-multiline-log-messages-fluent-bit-plugin https://newrelic.zendesk.com/hc/en-us/articles/360060439874-Logs-Multiline-Parsing But I am getting the same multiline logs issue. PHP Applications logs example: ERROR – 2021-05-24 00:35:34 → webhook data : { “dest”:“2782738428347”, “mid”: “38475387458374”, “status”:“001”, “reason”:“DELIVRD”, “stime”:“2021-05-24 ..

Read more

I’m trying to write a Laravel 8.0 task that renames the default log file every week and makes another empty file. I’m using a Debian 10 virtual machine as a testing environment. Here’s my handle() code: $now = Carbon::now(); $baseLog = "/laravel.log"; $oldLog = storage_path("logs".$baseLog); $renamedLog = storage_path("logs"."/log_".$now->day."_" .$now->month."_".$now->year.".log"); Storage::move($oldLog, $renamedLog); Storage::delete($oldLog); Storage::put(storage_path("logs".$baseLog), ""); The ..

Read more

I am using laravel auditing it shows an error on UUIDs I think, I have installed and configure the laravel auditing from http://www.laravel-auditing.com/docs/9.0/installation and change the user_id and id to UUIDs where the default types are bigInteger public function up() { Schema::create(‘audits’, function (Blueprint $table) { $table->uuid(‘id’)->primary(); $table->string(‘user_type’)->nullable(); $table->uuid(‘user_id’)->nullable(); $table->string(‘event’); $table->morphs(‘auditable’); $table->text(‘old_values’)->nullable(); $table->text(‘new_values’)->nullable(); $table->text(‘url’)->nullable(); $table->ipAddress(‘ip_address’)->nullable(); ..

Read more

datadog.conf log_level: warn log_file: /var/log/datadog/agent.log log_to_syslog: no dd_url: https://app.datadoghq.com api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx process_config: enabled: "true" logs_enabled: true tags: – env:stage – nginx – webserver – frontend – php-fpm – php use_dogstatsd: true dogstatsd_port: 8125 I needed to enable flag logs_enabled: true in order to collect PHP logs but with this, I also collect Nginx logs (access ..

Read more