This repository has been archived by the owner on Aug 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Readme file and changed the name of the serviceName param to be…
… type
- Loading branch information
Showing
2 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Log4Php LogzIo Appender | ||
|
||
[Logz.Io](https://logz.io/) appender for [log4php](https://logging.apache.org/log4php/). | ||
The appender uses tcp socket to send the event to logz.io | ||
|
||
## How to configure the appender | ||
|
||
example of log4php configuration file using the appender: | ||
``` | ||
<configuration xmlns="http://logging.apache.org/log4php/"> | ||
<appender name="logzIoAppender" class="\Soluto\LoggerAppenders\AppenderLogzIo"> | ||
<param name="host" value="listener.logz.io" /> | ||
<param name="port" value="5050" /> | ||
<param name="type" value="MyLogType" /> | ||
<param name="logzAccountToken" value="MyToken" /> | ||
</appender> | ||
<root> | ||
<level value="WARN" /> | ||
<appender_ref ref="logzIoAppender" /> | ||
</root> | ||
</configuration> | ||
``` | ||
|
||
you can get more information about the type parameter in [Logz.Io](https://support.logz.io/hc/en-us/sections/202356425-Supported-Log-Types) | ||
|
||
## How to consume the appender using Composer | ||
To import the package using [Composer](https://getcomposer.org/) you need to define the repository in your composer.json file. | ||
|
||
example composer.json file: | ||
``` | ||
{ | ||
"config": { | ||
"vendor-dir": "empty-theme/composer-vendor", | ||
}, | ||
"require": { | ||
"apache/log4php": "^2.3", | ||
"soluto/log4phpLogzIoAppender": "dev-master" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/Soluto/Log4PhpLogzIoAppender.git" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters