
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
com.github.maricn:logback-slack-appender
Advanced tools
Logback appender for sending messages to Slack chats.
Check out https://github.com/cyfrania/logback-slack-appender for up-to-date version (https://github.com/maricn/logback-slack-appender/issues/38).
I don't have time to take care and maintain this project anymore as I don't use logback on any of my projects. If anyone wants to have their fork linked from here, or to take over this repo, drop an issue. Take a look at a newer fork https://github.com/cyfrania/logback-slack-appender. Thanks for your support so far!
This is a simple Logback appender which pushes logs to Slack channel.
Add dependency to com.github.maricn:logback-slack-appender
in your pom.xml
.
Add SlackAppender configuration to logback.xml
file
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
...
<appender name="SLACK" class="com.github.maricn.logback.SlackAppender">
<!-- Slack API token -->
<token>1111111111-1111111-11111111-111111111</token>
<!-- Slack incoming webhook uri. Uncomment the lines below to use incoming webhook uri instead of API token. -->
<!--
<webhookUri>https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX</webhookUri>
-->
<!-- Channel that you want to post - default is #general -->
<channel>#api-test</channel>
<!-- Formatting (you can use Slack formatting - URL links, code formatting, etc.) -->
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
</layout>
<!-- Username of the messages sender -->
<username>${HOSTNAME}</username>
<!-- Emoji to be used for messages -->
<iconEmoji>:stuck_out_tongue_winking_eye:</iconEmoji>
<!-- If color coding of log levels should be used -->
<colorCoding>true</colorCoding>
</appender>
<!-- Currently recommended way of using Slack appender -->
<appender name="ASYNC_SLACK" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="SLACK" />
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="ASYNC_SLACK" />
</root>
</configuration>
Example of SlackAppender
configuration to logback.groovy
file (filtering by marker):
import com.github.maricn.logback.SlackAppender
import ch.qos.logback.core.filter.EvaluatorFilter
import ch.qos.logback.classic.AsyncAppender
import ch.qos.logback.classic.boolex.OnMarkerEvaluator
appender('SLACK', SlackAppender) {
channel = "#api-test"
username = "${HOSTNAME}"
colorCoding = "true"
webhookUri = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
layout(PatternLayout) {
pattern = "%-4relative [%thread] %-5level %class - %msg%n"
}
filter(EvaluatorFilter) {
evaluator(OnMarkerEvaluator) {
marker = "SLACK_MARKER"
}
onMismatch = DENY
onMatch = NEUTRAL
}
}
appender('ASYNC_SLACK', AsyncAppender) {
appenderRef("SLACK")
}
FAQs
Logback appender for sending messages to Slack chats.
We found that com.github.maricn:logback-slack-appender demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.