Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

HTTP Server logs to System/out #218

Closed
abhi18av opened this issue Aug 18, 2017 · 10 comments · Fixed by #219
Closed

HTTP Server logs to System/out #218

abhi18av opened this issue Aug 18, 2017 · 10 comments · Fixed by #219

Comments

@abhi18av
Copy link

abhi18av commented Aug 18, 2017

Hi @plexus

This template is an absolute life saver 👍

Could you please tell me how to disable logging?

screen shot 2017-08-18 at 17 35 43

For my use-case it's more of a distraction. Also, is there a way to switch to a nashorn/ rhino repl instead of the browser repl as far as clojurescript is concerned?

@plexus
Copy link
Owner

plexus commented Aug 18, 2017 via email

@featheredtoast
Copy link
Collaborator

There was a recent change here with removing onelog, which in the past, set up all http logging to fall under log/server.log

You'll now need to explicitly include onelog to get back logging config. Include this in your project dependencies:
[onelog "0.5.0"]

See relevant commit here:
7a3658e

@plexus I know we're trying to remove a conflict with different log versions, but should we have a log4j/onelog implementation included by default?

@featheredtoast featheredtoast changed the title Information on Readme regarding disabling the logging HTTP Server logs to System/out Aug 18, 2017
@plexus
Copy link
Owner

plexus commented Aug 18, 2017

I know we're trying to remove a conflict with different log versions, but should we have a log4j/onelog implementation included by default?

No idea... I'd have to dig into this. Happy to take your advice on this.

@featheredtoast
Copy link
Collaborator

I'd recommend adding the onelog dependency by default, and if a user is doing a fancier logging setup, they'll have full control over changing it, since the referenced commit.

@plexus
Copy link
Owner

plexus commented Aug 18, 2017

Sounds good! Sorry I'm a bit swamped with other stuff at the moment... anyone wants to cook up a PR?

@featheredtoast
Copy link
Collaborator

featheredtoast commented Aug 18, 2017 via email

@plexus
Copy link
Owner

plexus commented Aug 18, 2017 via email

@abhi18av
Copy link
Author

Hey, @plexus and @featheredtoast thanks for being so responsive on this :)

However, adding [onelog "0.5.0"] raises this warning message. I tried removing the slf4j-nop and slf4j-log4j12 folders as mentioned in website http://www.slf4j.org/codes.html#multiple_bindings but it just re-downloads that anyway.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/eklavya/.m2/repository/org/slf4j/slf4j-nop/1.6.2/slf4j-nop-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/eklavya/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

@abhi18av
Copy link
Author

The following exclusion resolves this

 [onelog "0.5.0" :exclusions [org.slf4j/slf4j-log4j12]]

I'll be closing this now as my original issue is perfectly solved.

However, could you please tell me how could I hook into the nashorn/ rhino repl using the template instead of the browser?

@featheredtoast
Copy link
Collaborator

I honestly don't know enough about running cljs over nashorn/node to speak to that, sorry. This template makes some firm assumptions using clj for server-side, and cljs for client-side. If you're interested in cljs server-side, this would best be asked in #clojurescript on the clojurians slack.

https://clojurescript.org/community/resources

featheredtoast added a commit to featheredtoast/chestnut that referenced this issue Aug 19, 2017
Adds a default log setup through onelogger.
this dependency no longer is shipped with the newer version of
ring.middleware.logger, so we need to explicitly include it.

closes plexus#218
featheredtoast added a commit to featheredtoast/chestnut that referenced this issue Aug 19, 2017
Adds a default log setup through clj-logging-config.
a log4j dependency is no longer is shipped with the newer version of
ring.middleware.logger, so we need to explicitly include it.

closes plexus#218
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants