-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCS Update readme to include a screenshot, configuration and cleanup…
… examples * Add confirmation to the "clear all" button
- Loading branch information
1 parent
e215199
commit a06b5cf
Showing
6 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace SilverLeague\LogViewer\Task; | ||
|
||
use SilverStripe\Core\Injector\Injector; | ||
use SilverStripe\Dev\BuildTask; | ||
|
||
/** | ||
* This is purely for demo purposes, and will log a message at every level for local testing or demo purposes. | ||
* | ||
* @package silverstripe-logviewer | ||
* @author Robbie Averill <[email protected]> | ||
*/ | ||
class CreateLogsTask extends BuildTask | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
private static $segment = 'CreateLogsTask'; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function run($request) | ||
{ | ||
$logger = Injector::inst()->get('Logger'); | ||
$logger->addDebug('Detailed debug information'); | ||
$logger->addInfo('Interesting events. Examples: User logs in, SQL logs.'); | ||
$logger->addNotice('Uncommon events'); | ||
$logger->addWarning( | ||
'Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, ' | ||
. 'undesirable things that are not necessarily wrong.' | ||
); | ||
$logger->addError('Runtime errors'); | ||
$logger->addCritical('Critical conditions. Example: Application component unavailable, unexpected exception.'); | ||
$logger->addAlert( | ||
'Action must be taken immediately. Example: Entire website down, database unavailable, etc. ' | ||
. 'This should trigger the SMS alerts and wake you up.' | ||
); | ||
$logger->addEmergency('Urgent alert.'); | ||
echo 'Finito.', PHP_EOL; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters