# \#logging

**URL:** https://discourse.julialang.org/tag/logging/438.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] ComponentLogging.jl — Nanosecond-scale hierarchical logging router](https://discourse.julialang.org/t/ann-componentlogging-jl-nanosecond-scale-hierarchical-logging-router/133100)

<div class="topic-metadata">

**Author:** [@karei](https://discourse.julialang.org/u/karei)\
**Replies:** 4\
**Last updated:** [October 14, 2025, 4:16am UTC](https://discourse.julialang.org/t/ann-componentlogging-jl-nanosecond-scale-hierarchical-logging-router/133100 "2025-10-14T04:16:10Z")

</div>

ComponentLogging.jl gives you fine-grained, per-group control over logs with function-first APIs (clog / clogenabled / clogf) and a plain, IO-agnostic design that keeps hot paths cheap. It is maintained under the JuliaLo…

---

## [@debug allocate even when not in DEBUG mode](https://discourse.julialang.org/t/debug-allocate-even-when-not-in-debug-mode/132854)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 6\
**Last updated:** [October 4, 2025, 5:56pm UTC](https://discourse.julialang.org/t/debug-allocate-even-when-not-in-debug-mode/132854 "2025-10-04T17:56:54Z")

</div>

I would like to add debug statement in a function that is meant to be call in loops, so I would like the performance to be independent of the @debug statement when not in DEBUG mode. As an MRE, I have the function foo, a…

---

## [Enable debug logging for one file or one function in a module](https://discourse.julialang.org/t/enable-debug-logging-for-one-file-or-one-function-in-a-module/132423)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 6\
**Last updated:** [September 22, 2025, 3:33pm UTC](https://discourse.julialang.org/t/enable-debug-logging-for-one-file-or-one-function-in-a-module/132423 "2025-09-22T15:33:09Z")

</div>

Is it possible to enable @debug messages selectively, for a specific file or function within a module? I see in the docs that Message filtering can be influenced through the JULIA\_DEBUG environment variable, and serve…

---

## [Capturing warnings inside generated functions](https://discourse.julialang.org/t/capturing-warnings-inside-generated-functions/132535)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 3\
**Last updated:** [September 21, 2025, 12:50pm UTC](https://discourse.julialang.org/t/capturing-warnings-inside-generated-functions/132535 "2025-09-21T12:50:53Z")

</div>

Is there a way to capture logging messages (e.g. warnings) issued during compilation, for example from inside a generated function? For example julia\> using Logging julia\> @generated foo() = @warn "this warning is emi…

---

## [Distributed and logging](https://discourse.julialang.org/t/distributed-and-logging/66503)

<div class="topic-metadata">

**Author:** [@torgo](https://discourse.julialang.org/u/torgo)\
**Replies:** 1\
**Last updated:** [June 30, 2025, 9:51am UTC](https://discourse.julialang.org/t/distributed-and-logging/66503 "2025-06-30T09:51:53Z")

</div>

I am trying to add a timestamp to a logger using LoggingExtras. I would like that timestamp to be propagated across workers, but I haven’t been able to figure out how. Here’s my MWE: module TestParLogging using Di…

---

## [Logging with some math output](https://discourse.julialang.org/t/logging-with-some-math-output/130062)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 0\
**Last updated:** [June 20, 2025, 2:18pm UTC](https://discourse.julialang.org/t/logging-with-some-math-output/130062 "2025-06-20T14:18:03Z")

</div>

I intend to use a logger to provide a log with a large number of messages on convergence statistics, what the code did, and stuff that might help with debugging. My current plan is to use a combination of LoggingExtras a…

---

## [Disable extra information when using @warn](https://discourse.julialang.org/t/disable-extra-information-when-using-warn/129826)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 9\
**Last updated:** [June 14, 2025, 2:42am UTC](https://discourse.julialang.org/t/disable-extra-information-when-using-warn/129826 "2025-06-14T02:42:25Z")

</div>

Hi, When I use @warn it prints the warning but also where it happened in the script. Is there a way to disable that information about the line in the script? Thank you.

---

## [Show @debug log in gitgub actions CI when activated](https://discourse.julialang.org/t/show-debug-log-in-gitgub-actions-ci-when-activated/125240)

<div class="topic-metadata">

**Author:** [@franckgaga](https://discourse.julialang.org/u/franckgaga)\
**Replies:** 1\
**Last updated:** [January 29, 2025, 3:23pm UTC](https://discourse.julialang.org/t/show-debug-log-in-gitgub-actions-ci-when-activated/125240 "2025-01-29T15:23:28Z")

</div>

Github actions allow debug logging that can be enabled here: I want to setup my CI.yml file to also show the @debug message. I added these 3 lines for this: name: CI on: push: branches: - main tags: …

---

## [Debug logging for package extensions](https://discourse.julialang.org/t/debug-logging-for-package-extensions/123883)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 2\
**Last updated:** [December 17, 2024, 11:03am UTC](https://discourse.julialang.org/t/debug-logging-for-package-extensions/123883 "2024-12-17T11:03:11Z")

</div>

Is it possible to enable debug logging for package extensions? I’m trying to simply do JULIA\_DEBUG=TaijaParallel,TaijaParallel.MPIExt mpiexec -n 4 julia --project=$EXPERIMENT\_DIR $EXPERIMENT\_DIR/run\_evaluation\_grid.jl --…

---

## [Uninvoked logging with interpolated string screws performance](https://discourse.julialang.org/t/uninvoked-logging-with-interpolated-string-screws-performance/123806)

<div class="topic-metadata">

**Author:** [@dpinol](https://discourse.julialang.org/u/dpinol)\
**Replies:** 2\
**Last updated:** [December 13, 2024, 11:51am UTC](https://discourse.julialang.org/t/uninvoked-logging-with-interpolated-string-screws-performance/123806 "2024-12-13T11:51:23Z")

</div>

I have a a hot loop function which merges 2 SparseVector of 1k items each. With @benchmark I can see that adding conditionWhichIsFalse && @warn lazy"msg $myIntVariable" after the loop, makes the function 3 times slow…

---

## [Logging from a Pluto notebook into the REPL from which it launched](https://discourse.julialang.org/t/logging-from-a-pluto-notebook-into-the-repl-from-which-it-launched/115269)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 4\
**Last updated:** [June 6, 2024, 2:42pm UTC](https://discourse.julialang.org/t/logging-from-a-pluto-notebook-into-the-repl-from-which-it-launched/115269 "2024-06-06T14:42:01Z")

</div>

Is there a way for a Pluto notebook to print/log into the REPL from which I launched it? I would need that to track progress of notebook CI runs

---

## [Did Logging lose colors on Julia 1.11?](https://discourse.julialang.org/t/did-logging-lose-colors-on-julia-1-11/110416)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [February 19, 2024, 7:27pm UTC](https://discourse.julialang.org/t/did-logging-lose-colors-on-julia-1-11/110416 "2024-02-19T19:27:25Z")

</div>

My log messages seem to have lost their color. Is this happening for anyone else on nightly?

---

## [How to properly implement logging in Julia package?](https://discourse.julialang.org/t/how-to-properly-implement-logging-in-julia-package/109863)

<div class="topic-metadata">

**Author:** [@p-gw](https://discourse.julialang.org/u/p-gw)\
**Replies:** 5\
**Last updated:** [February 8, 2024, 9:34am UTC](https://discourse.julialang.org/t/how-to-properly-implement-logging-in-julia-package/109863 "2024-02-08T09:34:49Z")

</div>

Hi everyone, I was wondering how to properly implement logging for a function in a julia package. My problem looks something like this: I have an algorithm with iter iterations and I want to provide the user with infor…

---

## [HPC Slurm Logging Peer Check](https://discourse.julialang.org/t/hpc-slurm-logging-peer-check/104732)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 4\
**Last updated:** [October 9, 2023, 1:05pm UTC](https://discourse.julialang.org/t/hpc-slurm-logging-peer-check/104732 "2023-10-09T13:05:21Z")

</div>

Hello, I am looking for some help understanding what is probably a familiar problem to those who run Julia regularly on an HPC with Slurm. I’ll explain the issue and then share what I’ve found. Hopefully someone can hel…

---

## [Why isn't the debug logging triggered when \`JULIA\_DEBUG\` is being set to a Main submodule?](https://discourse.julialang.org/t/why-isnt-the-debug-logging-triggered-when-julia-debug-is-being-set-to-a-main-submodule/100050)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [June 8, 2023, 12:18pm UTC](https://discourse.julialang.org/t/why-isnt-the-debug-logging-triggered-when-julia-debug-is-being-set-to-a-main-submodule/100050 "2023-06-08T12:18:01Z")

</div>

julia\> module Temp function f() @debug "in here" return end end Main.Temp julia\> ENV\["JULIA\_DEBUG"\]=Main.Temp Main.Temp julia\> Temp.f() julia\> ENV\["JULIA\_DEBU…

---

## [Using @logmsg with begin/end blocks](https://discourse.julialang.org/t/using-logmsg-with-begin-end-blocks/99290)

<div class="topic-metadata">

**Author:** [@florian](https://discourse.julialang.org/u/florian)\
**Replies:** 3\
**Last updated:** [May 24, 2023, 7:10am UTC](https://discourse.julialang.org/t/using-logmsg-with-begin-end-blocks/99290 "2023-05-24T07:10:45Z")

</div>

Is it somehow possible to do this: @debug "Results of my calculations: " A=1:100 B=(1:100).\*10 In block form, meaning something like this: @debug begin ## Do some stuff: A = 1:100 B = A .\* 10 ## C…

---

## [Logging: filter packages](https://discourse.julialang.org/t/logging-filter-packages/98692)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 1\
**Last updated:** [May 11, 2023, 5:23pm UTC](https://discourse.julialang.org/t/logging-filter-packages/98692 "2023-05-11T17:23:43Z")

</div>

Hey folks, A quick question: I’ve set the logging level so that I can see @debug messages from my package as I develop stuff. However this will naturally also show @debug messages from other packages that are called fro…

---

## [A way to set logging level in Pluto notebooks](https://discourse.julialang.org/t/a-way-to-set-logging-level-in-pluto-notebooks/95074)

<div class="topic-metadata">

**Author:** [@AsgerHB](https://discourse.julialang.org/u/AsgerHB)\
**Replies:** 13\
**Last updated:** [April 11, 2023, 10:05am UTC](https://discourse.julialang.org/t/a-way-to-set-logging-level-in-pluto-notebooks/95074 "2023-04-11T10:05:05Z")

</div>

Is there a way to set the logging level of a cell in Pluto? By default it will show everything, including debug. Or even just a way to set it globally? Pluto notebooks are a great way to debug newly developed code, …

---

## [Disable warnings in \`Plots\`](https://discourse.julialang.org/t/disable-warnings-in-plots/93838)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [January 31, 2023, 11:34pm UTC](https://discourse.julialang.org/t/disable-warnings-in-plots/93838 "2023-01-31T23:34:50Z")

</div>

I am using Plots to plot(data,options...). This produces tons of Warnings like: ┌ Warning: Indices Base.OneTo(7) of attribute \`fillcolor\` does not match data indices 1:6. └ @ Plots ~/.julia/packages/Plots/AAjgN/src/util…

---

## [Interaction between \`Logging.jl\`, \`JuliaFormatter.jl\` and \`Documenter.jl\`?](https://discourse.julialang.org/t/interaction-between-logging-jl-juliaformatter-jl-and-documenter-jl/93504)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 3\
**Last updated:** [January 26, 2023, 9:36am UTC](https://discourse.julialang.org/t/interaction-between-logging-jl-juliaformatter-jl-and-documenter-jl/93504 "2023-01-26T09:36:58Z")

</div>

Hi there, I am very confused by the interaction(s?) between Logging.jl, JuliaFormatter.jl and Documenter.jl. My initial problem was that I had blocks like this in my package documentation: \`\`\`@example my\_function() # r…

---

## [Logging error TensorBoardLogger with Flux](https://discourse.julialang.org/t/logging-error-tensorboardlogger-with-flux/93482)

<div class="topic-metadata">

**Author:** [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 2:00am UTC](https://discourse.julialang.org/t/logging-error-tensorboardlogger-with-flux/93482 "2023-01-25T02:00:45Z")

</div>

I have trouble logging Flux training output using TensorBoardLogger. The log file created has the following error message: Error! /Users/xxx/log/events.out.tfevents.xxxxx.local is not UTF-8 encoded Saving disabled See c…

---

## [Logging for later analysis](https://discourse.julialang.org/t/logging-for-later-analysis/92315)

<div class="topic-metadata">

**Author:** [@Gokhan\_Kof](https://discourse.julialang.org/u/Gokhan_Kof)\
**Replies:** 2\
**Last updated:** [December 30, 2022, 2:27pm UTC](https://discourse.julialang.org/t/logging-for-later-analysis/92315 "2022-12-30T14:27:05Z")

</div>

Hi, Inside Logging documentation, it says “the logging tools allow you to attach arbitrary data to each event as a set of key–value pairs. This allows you to capture local variables and other program state for later ana…

---

## [Suppressing location information for @info in Jupyter notebook](https://discourse.julialang.org/t/suppressing-location-information-for-info-in-jupyter-notebook/90260)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 2:46am UTC](https://discourse.julialang.org/t/suppressing-location-information-for-info-in-jupyter-notebook/90260 "2022-11-15T02:46:27Z")

</div>

Dear All, Is there a way to suppress the location information for @info in Jupyter notebook? For example, if I type the following in a Jupyter notebook cell @info "hello world" and execute the cell, then the output in…

---

## [Logger local variable context](https://discourse.julialang.org/t/logger-local-variable-context/87828)

<div class="topic-metadata">

**Author:** [@efficiencynuts](https://discourse.julialang.org/u/efficiencynuts)\
**Replies:** 4\
**Last updated:** [October 30, 2022, 5:40pm UTC](https://discourse.julialang.org/t/logger-local-variable-context/87828 "2022-10-30T17:40:12Z")

</div>

I want to have a custom logger that will log certain local variables if available. I can’t seem to make the logger see the local variables. Normally I could do: @info gs\_tester to get an output like Info: gs\_tester="…

---

## [TeeLogger and stdout/stderr redirection](https://discourse.julialang.org/t/teelogger-and-stdout-stderr-redirection/87641)

<div class="topic-metadata">

**Author:** [@dapz](https://discourse.julialang.org/u/dapz)\
**Replies:** 0\
**Last updated:** [September 22, 2022, 12:59pm UTC](https://discourse.julialang.org/t/teelogger-and-stdout-stderr-redirection/87641 "2022-09-22T12:59:17Z")

</div>

Hi, I would like to run some code and get all the outputs: (1) either on the console or (2) redirected to a file or (3) both at the same time. I have been using Logging utilities and LoggingExtras to define a TeeLogger t…

---

## [Term.jl / logging / sending messages to multiple locations](https://discourse.julialang.org/t/term-jl-logging-sending-messages-to-multiple-locations/84841)

<div class="topic-metadata">

**Author:** [@j\_u](https://discourse.julialang.org/u/j_u)\
**Replies:** 8\
**Last updated:** [July 30, 2022, 11:26pm UTC](https://discourse.julialang.org/t/term-jl-logging-sending-messages-to-multiple-locations/84841 "2022-07-30T23:26:30Z")

</div>

I’d like to ask if sending logging messages both to terminal and to a file is supported by Term.jl \[Logging · Term.jl\]. I read in JuliaLogging documentation that Logging together with LoggingExtras is supporting such opt…

---

## [Including a variable outside a function in a log message](https://discourse.julialang.org/t/including-a-variable-outside-a-function-in-a-log-message/84347)

<div class="topic-metadata">

**Author:** [@florian](https://discourse.julialang.org/u/florian)\
**Replies:** 1\
**Last updated:** [July 17, 2022, 9:54am UTC](https://discourse.julialang.org/t/including-a-variable-outside-a-function-in-a-log-message/84347 "2022-07-17T09:54:42Z")

</div>

Assume I have a function that does some calculation on a piece of data and I want to log when somewthing goes wrong: struct MyData id::String number::Number end function main() data = \[MyData("a", -1), My…

---

## [Writing Messages to a Log file](https://discourse.julialang.org/t/writing-messages-to-a-log-file/79266)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 2\
**Last updated:** [April 10, 2022, 1:05pm UTC](https://discourse.julialang.org/t/writing-messages-to-a-log-file/79266 "2022-04-10T13:05:58Z")

</div>

Hello, I’d like to write a function that will print all logging statements to a file. I’ve tried the following based on the Logging documentation but nothing gets written to the file. My naive first pass was to wrap my…

---

## [Logging vs pushing to dataframe](https://discourse.julialang.org/t/logging-vs-pushing-to-dataframe/77566)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 5\
**Last updated:** [March 12, 2022, 4:52pm UTC](https://discourse.julialang.org/t/logging-vs-pushing-to-dataframe/77566 "2022-03-12T16:52:04Z")

</div>

I am currently tracking progress during an iterative process in two different domains - numerical solutions of nonlinear equations, and machine learning. In order to track the progress, I have been simply pushing to a Da…

---

## [Logging: symbol evaluation under the hood](https://discourse.julialang.org/t/logging-symbol-evaluation-under-the-hood/77399)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 4\
**Last updated:** [March 5, 2022, 6:56pm UTC](https://discourse.julialang.org/t/logging-symbol-evaluation-under-the-hood/77399 "2022-03-05T18:56:38Z")

</div>

Hey everyone, As mentioned in other posts, I’m working on a package called Term.jl that does a bunch of pretty terminal stuff like printing formatted error messages: One of the features I’d like to add is formatted …

[Next page](https://discourse.julialang.org/tag/logging/438.md?match_all_tags=true&page=1&tags%5B%5D=logging)
