Skip to content

Commit

Permalink
fix getting default log level (fix #35)
Browse files Browse the repository at this point in the history
ref: #35
  • Loading branch information
tanmaykm committed Nov 13, 2016
1 parent 1dc4032 commit 630424a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
julia 0.4
ZMQ 0.3.3
JSON
Logging
Logging 0.3.1
HttpCommon
HttpServer
Compat 0.8.0
4 changes: 2 additions & 2 deletions src/APIResponder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function process_async(apispecs::Array, addr::AbstractString=get(ENV,"JBAPI_QUEU
process(apispecs, addr; log_level=log_level, bind=bind, nid=nid, async=true)
end

function process(apispecs::Array, addr::AbstractString=get(ENV,"JBAPI_QUEUE",""); log_level=Logging.LogLevel(@compat(parse(Int32,get(ENV, "JBAPI_LOGLEVEL", "1")))),
function process(apispecs::Array, addr::AbstractString=get(ENV,"JBAPI_QUEUE",""); log_level=Logging.LogLevel(get(ENV, "JBAPI_LOGLEVEL", "INFO")),
bind::Bool=false, nid::AbstractString=get(ENV,"JBAPI_CID",""), async::Bool=false)
setup_logging(;log_level=log_level)
Logging.debug("queue is at $addr")
Expand Down Expand Up @@ -212,7 +212,7 @@ function create_responder(apispecs::Array, addr, bind, nid)
end

function process()
log_level = Logging.LogLevel(@compat(parse(Int32,get(ENV, "JBAPI_LOGLEVEL", "1"))))
log_level = Logging.LogLevel(get(ENV, "JBAPI_LOGLEVEL", "INFO"))
setup_logging(;log_level=log_level)

Logging.info("Reading api server configuration from environment...")
Expand Down

0 comments on commit 630424a

Please sign in to comment.