Skip to content

Commit ad77f0c

Browse files
committed
2 parents e7199fa + 1e37ac4 commit ad77f0c

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22
SlackAppender is a Log4J Appender for routing log messages to Slack.
33

44
# Requirements
5-
- Log4J
6-
- Java 8 or higher
7-
- Slack Incoming Webhook integration enabled (https://api.slack.com/incoming-webhooks)
5+
- Log4J 1.x (SlackAppender currently does NOT directly support Log4j 2, but should work in Log4j 2 through the [Log4j 1.x bridge](https://logging.apache.org/log4j/2.x/manual/migration.html))
6+
- Java 8 or higher (Since it depends on [Nashorn](https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)))
7+
- A configured [Slack Incoming Webhook integration](https://api.slack.com/incoming-webhooks)
88

99
# Configuration
1010
In order to use the SlackAppender, the SlackAppender needs to be added to the classpath of the Java application for which it is being used and Log4J should be configured to use the SlackAppender.
1111

1212
Appender classname: com.tod.utils.logging.SlackAppender
1313

14-
Available (appender specific) settings :
15-
- Url (mandatory):
16-
- UserName:
17-
- Channel:
18-
- Emoji:
14+
Available (appender specific) settings:
15+
- Url (mandatory): the url provided by slack when setting up an Incoming Webhook in Slack
16+
- UserName: Overrides the userName configured in the Incoming Webhook in Slack
17+
- Channel: Overrides the channel configured in the Incoming Webhook in Slack
18+
- Emoji: Overrides the emoji configured in the Incoming Webhook in Slack
1919

20-
Example config through log4j properties
20+
Example config through log4j properties:
21+
```
2122
log4j.appender.slack=com.tod.utils.logging.SlackAppender
2223
log4j.appender.slack.Threshold=ERROR
2324
log4j.appender.slack.Url={the URL of the Incoming Webhook URL setup within Slack}
2425
log4j.appender.slack.UserName={your username here}
2526
log4j.appender.slack.Channel={the channel to post the messages in}
2627
log4j.appender.slack.Emoji={the icon to use}
28+
```
2729

2830
# Feature Requests & Bugs
2931
Found a bug or would like to see a new feature implemented? Raise an issue in the [Issue Tracker](https://github.com/TheOrangeDots/SlackAppender/issues)
@@ -32,4 +34,4 @@ Found a bug or would like to see a new feature implemented? Raise an issue in th
3234
Eager to fix a bug or introduce a new feature? Clone the repository and issue a pull request
3335

3436
# License
35-
SlackAppender is licensed under MIT License
37+
SlackAppender is licensed under MIT License

0 commit comments

Comments
 (0)