From f540941d3f3073f2200cf42d9f04a712cd025a24 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Thu, 10 Apr 2014 18:35:43 +0200 Subject: [PATCH] Added getNewInstance() method --- core/lib/Thelia/Log/Tlog.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/lib/Thelia/Log/Tlog.php b/core/lib/Thelia/Log/Tlog.php index 1eaf64350..b8792bddb 100644 --- a/core/lib/Thelia/Log/Tlog.php +++ b/core/lib/Thelia/Log/Tlog.php @@ -124,6 +124,19 @@ class Tlog Implements LoggerInterface return self::$instance; } + /** + * Create a new Tlog instance, than t will not interfere with the "Main" instance + * + * @return Tlog a new Tlog instance + */ + public static function getNewInstance() { + $instance = new Tlog(); + + $instance->init(); + + return $instance; + } + /** * initialize default configuration */