# Logging strategies

**URL:** <https://discourse.processing.org/t/logging-strategies/39108>\
**Category:** Project Guidance\
**Created:** [October 5, 2022, 10:47pm UTC](https://discourse.processing.org/t/logging-strategies/39108 "2022-10-05T22:47:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![renaudfv](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@renaudfv](https://discourse.processing.org/u/renaudfv)\
**Post date:** [October 5, 2022, 10:47pm UTC](https://discourse.processing.org/t/logging-strategies/39108/1 "2022-10-05T22:47:48Z")

</div>

Hi everyone!

I was exploring logging strategies for projects that need to run all the time. It mainly comes out of a need to find if any errors are thrown by Processing/PApplet.

[Here’s a gist/snippet of what I came up with.](https://gist.github.com/renaudfv/25676b81049c6df22903c7e9e28f6fd5)

It’s lacking log rotations and is being overwritten, but it’s a start.

What are your go-to strategies?

Renaud

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 6, 2022, 7:39am UTC](https://discourse.processing.org/t/logging-strategies/39108/2 "2022-10-06T07:39:48Z")

</div>

Hi @renaudfv,

I am not really familiar with logging in Java but here is a nice website that shows different solutions:

> **[Java Logging Tools and Libraries - Directory of Java logging frameworks](http://www.java-logging.com/)**
>
> Guide and directory to Java logging frameworks, libraries and articles with links to popular logging tools, websites and tutorials including log4j, SLF4J, SmartInspect and more

One popular logging framework is [Log4J](https://logging.apache.org/log4j/2.x/) (also known for a recent vulnerability 😉 )

---

<div class="post-metadata">

**Author:** ![renaudfv](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@renaudfv](https://discourse.processing.org/u/renaudfv)\
**Post date:** [February 22, 2023, 3:10pm UTC](https://discourse.processing.org/t/logging-strategies/39108/3 "2023-02-22T15:10:58Z")

</div>

Hi, @josephh thanks for the feedback.

If anyone is looking for a clear example using the native Java libs, here it is:

> <https://gist.github.com/renaudfv/8683660061e06fbe14848b67b1c8e379>
