From 9e2b2a32fd0e967ad3184e9a5d091a29953acb91 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 25 Oct 2017 16:22:10 -0700 Subject: Include composer dependencies in repo --- .../simpleLogger/src/SimpleLogger/File.php | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 vendor/fguillot/simpleLogger/src/SimpleLogger/File.php (limited to 'vendor/fguillot/simpleLogger/src/SimpleLogger/File.php') diff --git a/vendor/fguillot/simpleLogger/src/SimpleLogger/File.php b/vendor/fguillot/simpleLogger/src/SimpleLogger/File.php new file mode 100644 index 00000000..be3bfa85 --- /dev/null +++ b/vendor/fguillot/simpleLogger/src/SimpleLogger/File.php @@ -0,0 +1,48 @@ +filename = $filename; + } + + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string $message + * @param array $context + */ + public function log($level, $message, array $context = array()) + { + $line = $this->formatMessage($level, $message, $context); + + if (file_put_contents($this->filename, $line, FILE_APPEND | LOCK_EX) === false) { + throw new RuntimeException('Unable to write to the log file.'); + } + } +} -- cgit v1.2.3