Skip to content

Commit 2f560c4

Browse files
committed
simpler namespace
1 parent fa33a7e commit 2f560c4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"autoload": {
1414
"psr-4": {
15-
"Buffer\\BuffLog\\": "./src/BuffLog"
15+
"BuffLog\\": "./src/BuffLog"
1616
}
1717
}
1818
}

example.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
<?php
2-
require_once('./src/Bufflog/BuffLog.php');
2+
require_once('./vendor/autoload.php');
3+
require_once('./src/BuffLog/BuffLog.php');
34

4-
use Buffer\Bufflog;
5+
use Buffer\BuffLog;
56

67
// putenv("LOG_VERBOSITY=WARNING");
7-
Bufflog::debug("I am a debug");
8-
Bufflog::debug("I am a debug with context", ["my key" => " my value"]);
8+
BuffLog::debug("I am a debug");
9+
BuffLog::debug("I am a debug with context", ["my key" => " my value"]);
910

10-
Bufflog::info("I am an info");
11-
Bufflog::info("I am a info with context", ["my key" => " my value"]);
11+
BuffLog::info("I am an info");
12+
BuffLog::info("I am a info with context", ["my key" => " my value"]);
1213

13-
Bufflog::warning("I am a warning");
14-
Bufflog::warning("I am a warning", ["duration" => "40ms"]);
14+
BuffLog::warning("I am a warning");
15+
BuffLog::warning("I am a warning", ["duration" => "40ms"]);
1516

16-
Bufflog::error("I am an error");
17-
Bufflog::error("I am an error", ["mean" => "70"]);
17+
BuffLog::error("I am an error");
18+
BuffLog::error("I am an error", ["mean" => "70"]);
1819

19-
Bufflog::criticals("I am criticals information with a typo and you shouldn't see me!");
20-
Bufflog::critical("I am critical information!", ["user" => "betrand"]);
20+
BuffLog::criticals("I am criticals information with a typo and you shouldn't see me!");
21+
BuffLog::critical("I am critical information!", ["user" => "betrand"]);
2122

22-
Bufflog::critical("I'm critical log, here some extra fancy informations",
23+
BuffLog::critical("I'm critical log, here some extra fancy informations",
2324
[
2425
"duration" => "40ms",
2526
"services_related" => [

src/BuffLog/BuffLog.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
namespace Buffer\BuffLog;
3-
require_once('vendor/autoload.php');
2+
namespace Buffer;
43

54
use Monolog\Logger as Logger;
65
use Monolog\Handler\StreamHandler;

0 commit comments

Comments
 (0)