# Is Logger thread safe?

**URL:** <https://www.ruby-forum.com/t/is-logger-thread-safe/141710>\
**Category:** Ruby\
**Created:** [June 29, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/is-logger-thread-safe/141710 "2008-06-29T21:49:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [June 29, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/is-logger-thread-safe/141710/1 "2008-06-29T21:49:07Z")

</div>

Hi, in my program I use threads and a Logger instante accessible from  
any  
thread. Must I do something to make the Logger thread safe?

I’ve looked at the Logger code and it seems that it uses Mutex in some  
methods  
and does a:  
require ‘monitor’

Is then Logger class thread safe and I can call its methods  
(@logger.debug…)  
from any thread in parallel safely?

Thanks.
