Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
envelope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
logging
envelope
Commits
111689f1
Verified
Commit
111689f1
authored
Oct 02, 2018
by
Kjetil Thuen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge in logformat fn if set
parent
74c84d80
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
14 deletions
+9
-14
README.md
README.md
+5
-2
deps.edn
deps.edn
+1
-10
project.clj
project.clj
+1
-1
src/no/nsd/envelope.cljc
src/no/nsd/envelope.cljc
+2
-1
No files found.
README.md
View file @
111689f1
...
...
@@ -108,8 +108,11 @@ If you depend on third party code that use `clojure/tools.logging`, `slf4j`, `jc
`log4j`
or
`jul`
for logging, those log entries will be consumed by
`Envelope`
and
injected into your log. You don't need to do anything for this to work.
*Note*
: If any of your dependencies depends on an older
`slf4j-api`
than "1.7.14", there might be problems.
**Note**
: Some libraries (datomic peer being one of these) will look at your
dependency graph and try redirect their log output to known log targets they
find there. If you are seeing some components not using
`envelope`
, try using
`:exclusions`
in your dependency graph to remove transient dependencies to
`slf4j`
,
`logback`
and other logging frameworks.
### Context
...
...
deps.edn
View file @
111689f1
...
...
@@ -7,13 +7,4 @@
com.fzakaria/slf4j-timbre
{
:mvn/version
"0.3.12"
}
org.slf4j/log4j-over-slf4j
{
:mvn/version
"1.7.14"
}
org.slf4j/jul-to-slf4j
{
:mvn/version
"1.7.14"
}
org.slf4j/jcl-over-slf4j
{
:mvn/version
"1.7.14"
}}
:aliases
{
:test
{
:extra-paths
[
"test"
]
:extra-deps
{
org.clojure/test.check
{
:mvn/version
"RELEASE"
}}}
:runner
{
:extra-deps
{
com.cognitect/test-runner
{
:git/url
"https://github.com/cognitect-labs/test-runner"
:sha
"76568540e7f40268ad2b646110f237a60295fa3c"
}}
:main-opts
[
"-m"
"cognitect.test-runner"
"-d"
"test"
]}}}
org.slf4j/jcl-over-slf4j
{
:mvn/version
"1.7.14"
}}}
project.clj
View file @
111689f1
(
defproject
no.nsd/envelope
"0.1.
0
"
(
defproject
no.nsd/envelope
"0.1.
1
"
:description
"A thin wrapper around taoensso.timbre with built in settings for logging to NSD's ELK stack"
:url
"https://gitlab.nsd.no/clojure/envelope"
:license
{
:name
"Eclipse Public License"
...
...
src/no/nsd/envelope.cljc
View file @
111689f1
...
...
@@ -70,7 +70,8 @@
(
if
elk?
:info
:debug
))
:output-fn
(
if
elk?
(
partial
nsd-logstash-format-fn
current-conf
)
local-console-format-fn
)})
(
or
(
:output-fn
current-conf
)
local-console-format-fn
)})
current-conf
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment