krzysztofzylka / open-observe
OpenObserve PHP Library
1.0
2024-03-15 19:24 UTC
Requires
- php: >=7.4
README
Configure
\Krzysztofzylka\OpenObserve\OpenObserve::$USERNAME = ''; \Krzysztofzylka\OpenObserve\OpenObserve::$PASSWORD = ''; \Krzysztofzylka\OpenObserve\OpenObserve::$HOST = 'http://127.0.0.1:5080'; \Krzysztofzylka\OpenObserve\OpenObserve::$STREAM = 'default'; \Krzysztofzylka\OpenObserve\OpenObserve::$ORGANIZATION = 'default'; \Krzysztofzylka\OpenObserve\OpenObserve::$SSLVERIFYPEER = false;
Send log
public static function send( string $message, string $level = 'INFO', array $data = [] )
Example
\Krzysztofzylka\OpenObserve\OpenObserve::send( 'message', 'INFO', ['additional' => 'data'] )
Log:
{"_timestamp":1710530478602382,"additional":"data","level":"INFO","message":"message"}