Skip to content

Commit 18c4c27

Browse files
committed
renames XLog to Logger
1 parent cd6cd4b commit 18c4c27

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/XLog.php renamed to src/Logger.php

+15
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,17 @@
77

88
class Logger
99
{
10+
/**
11+
* @var array
12+
*/
1013
private static $LOG_LEVELS = ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'];
1114

15+
/**
16+
* @param $name
17+
* @param $arguments
18+
*
19+
* @return mixed
20+
*/
1221
public function __call($name, $arguments)
1322
{
1423
if (!in_array($name, self::$LOG_LEVELS)) {
@@ -18,6 +27,12 @@ public function __call($name, $arguments)
1827
return call_user_func_array(['Illuminate\Support\Facades\Log', $name], $arguments);
1928
}
2029

30+
/**
31+
* @param $name
32+
* @param $arguments
33+
*
34+
* @return mixed
35+
*/
2136
public static function __callStatic($name, $arguments)
2237
{
2338
if (session_status() == PHP_SESSION_NONE) {

src/XLogServiceProvider.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ public function boot()
1919
*/
2020
public function register()
2121
{
22-
$this->app->singleton(env('XLOG_TRACK_ID_KEY', 'xTrackId'), function ($app) {
22+
$this->app->singleton(env('XLOG_TRACK_ID_KEY', 'xTrackId'), function () {
2323
return substr(sha1(uniqid('xTrackId')), 0, 10);
2424
});
25-
26-
$this->app->singleton('XLog', function ($app) {
27-
return new \Tartan\Log\XLog($app);
28-
});
2925
}
3026
}

0 commit comments

Comments
 (0)