Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vsliv update stomp #10

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"require": {
"php": "^8.1",
"asseco-voice/laravel-common": "^3.0",
"asseco-voice/laravel-stomp": "^3.0",
"asseco-voice/laravel-stomp": "^4.0",
"graylog2/gelf-php": "^1.6",
"laravel/framework": "^10.0"
},
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use Asseco\Gelf\App\Processors\RenameIdFieldProcessor;

return [
'driver' => 'custom',
'via' => GelfLoggerFactory::class,
'level' => 'debug',
'driver' => 'custom',
'via' => GelfLoggerFactory::class,
'level' => 'debug',

/**
* Processors that should be pushed to the handler.
Expand All @@ -17,7 +17,7 @@
* data. Each processor must be a callable or an object with an
* __invoke method: see monolog documentation about processors.
*/
'processors' => [
'processors' => [
NullStringProcessor::class,
RenameIdFieldProcessor::class,
// ...
Expand All @@ -27,12 +27,12 @@
* Channel over which the messages are transported.
* Available options: udp, tcp, http or event.
*/
'transport' => env('GRAYLOG_TRANSPORT', 'event'),
'transport' => env('GRAYLOG_TRANSPORT', 'event'),

/**
* Event transport specific options.
*/
'event' => [
'event' => [
/**
* Event to be triggered. If you want to override this behavior, be sure your event
* implements Asseco\Stomp\Queue\Contracts\HasRawData interface.
Expand All @@ -49,26 +49,26 @@
* This option determines the host that will receive the
* gelf log messages.
*/
'host' => env('GRAYLOG_HOST', 'graylog'),
'host' => env('GRAYLOG_HOST', 'graylog'),

/**
* This option determines the port on which the gelf
* receiver host is listening.
*/
'port' => (int) env('GRAYLOG_PORT', 12201),
'port' => (int) env('GRAYLOG_PORT', 12201),

/**
* This option determines the path used for the HTTP
* transport. When forgotten or set to null, default path '/gelf'
* is used.
*/
'path' => null,
'path' => null,

/**
* This option determines the prefix for 'extra' fields
* from the Monolog record.
*/
'extra_prefix' => null,
'extra_prefix' => null,

/**
* This option determines the prefix for 'context' fields
Expand All @@ -82,25 +82,25 @@
* \Monolog\Formatter\GelfMessageFormatter::DEFAULT_MAX_LENGTH is
* used (currently this value is 32766).
*/
'max_length' => null,
'max_length' => null,

/**
* This option enables or disable ssl on TCP or HTTP
* transports.
*/
'ssl' => false,
'ssl' => false,

// If ssl is enabled, the following configuration is used.
'ssl_options' => [
'ssl_options' => [
// Enable or disable the peer certificate check.
'verify_peer' => true,
'verify_peer' => true,

// Path to a custom CA file (eg: "/path/to/ca.pem").
'ca_file' => null,
'ca_file' => null,

// List of ciphers the SSL layer may use, formatted as
// specified in ciphers(1).
'ciphers' => null,
'ciphers' => null,

// Whether self-signed certificates are allowed.
'allow_self_signed' => false,
Expand Down
14 changes: 7 additions & 7 deletions src/App/GelfLoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class GelfLoggerFactory
protected Container $app;

protected array $logLevels = [
'debug' => Logger::DEBUG,
'info' => Logger::INFO,
'notice' => Logger::NOTICE,
'warning' => Logger::WARNING,
'error' => Logger::ERROR,
'critical' => Logger::CRITICAL,
'alert' => Logger::ALERT,
'debug' => Logger::DEBUG,
'info' => Logger::INFO,
'notice' => Logger::NOTICE,
'warning' => Logger::WARNING,
'error' => Logger::ERROR,
'critical' => Logger::CRITICAL,
'alert' => Logger::ALERT,
'emergency' => Logger::EMERGENCY,
];

Expand Down
Loading