Skip to content

Commit

Permalink
unsignedInteger for level column
Browse files Browse the repository at this point in the history
  • Loading branch information
goszowski committed Nov 17, 2021
1 parent dd1bcdd commit 6d0d2a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ return [

// ...
'database' => [
'driver' => 'custom',
'driver' => 'monolog',
'handler' => Goszowski\DatabaseLogChannel\Logging\DatabaseLogHandler::class,
'via' => Goszowski\DatabaseLogChannel\Logging\DatabaseLogger::class,

Expand All @@ -44,6 +44,7 @@ return [
'table' => 'logs',
'async' => true, // If true, will be sent to the queue
'queue' => 'default', // Define a queue for asynchronous logging
'level' => 'error',
],

],
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/create_logs_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CreateLogsTable extends Migration
$table->uuid('id')->primary();
$table->longText('message');
$table->longText('context');
$table->string('level')->index();
$table->unsignedInteger('level')->index();
$table->string('level_name');
$table->string('channel')->index();
$table->timestamp('record_datetime', 6);
Expand Down

0 comments on commit 6d0d2a6

Please sign in to comment.