# Log (eg depwarn) message source full path

**URL:** https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207
**Category:** Internals & Design
**Tags:** question
**Created:** [July 6, 2018, 9:50am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207 "2018-07-06T09:50:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [July 6, 2018, 9:50am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207/1 "2018-07-06T09:50:03Z")

</div>

I am in the process of updating [julia-repl.el](https://github.com/tpapp/julia-repl), the Emacs mode for interacting with the Julia REPL, to work with v0.7. A particular feature is to make source locations “clickable”, this works by recognizing regexps like

```julia
at \\([^ ><()\t\n,'\";:]+\\):\\([0-9]+\\)

```

in error messages like

```julia
┌ Warning: `chol(A::AbstractMatrix)` is deprecated, use `(cholesky(A)).U` instead.
│ caller = decompose_variance(::Array{Float64,2}) at utilities.jl:40
└ @ IndirectLikelihood utilities.jl:40

```

so `utilities.jl:40` is recognized as a `filename:linenum`.

It would be most convenient to have the full path again (like in v0.6). I am still learning about the new logging framework, but I wonder if this is possible somehow.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [July 6, 2018, 10:23am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207/2 "2018-07-06T10:23:21Z")

</div>

Not an answer to your question, but I wonder if the logging message should print the full path instead of just the filename. This has annoyed me alot when trying to find depwarns, since often packages have a file `src/foo.jl` accompanied with `test/foo.jl` and it is impossible to know which one you should look in.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [July 6, 2018, 10:24am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207/3 "2018-07-06T10:24:54Z")

</div>

I agree. I will wait for some discussion, and then open an issue.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [July 6, 2018, 10:40am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207/4 "2018-07-06T10:40:59Z")

</div>

Turns out that `SimpleLogger` prints it in full:

```julia
shell> cat foo.jl
foo() = @warn "warning"

julia> include("foo.jl")
foo (generic function with 1 method)

julia> foo()
┌ Warning: warning
└ @ Main foo.jl:1

julia> Base.CoreLogging.global_logger(Base.CoreLogging.SimpleLogger(stderr))
Logging.ConsoleLogger(Base.TTY(RawFD(0x0000000f) open, 0 bytes waiting), Info, Logging.default_metafmt, true, 0, Dict{Any,Int64}())

julia> foo()
┌ Warning: warning
└ @ Main /home/fredrik/julia-master/foo.jl:1

```

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [July 6, 2018, 11:02am UTC](https://discourse.julialang.org/t/log-eg-depwarn-message-source-full-path/12207/5 "2018-07-06T11:02:33Z")

</div>

See [https://github.com/JuliaLang/julia/pull/27953](https://github.com/JuliaLang/julia/pull/27953)
