Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
a6d1449b
Commit
a6d1449b
authored
Jul 11, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deprecated log class. removed from aliases. added storage/log.txt.
parent
8053d8e9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
78 deletions
+0
-78
aliases.php
application/config/aliases.php
+0
-2
log.txt
application/storage/log.txt
+0
-0
log.php
system/log.php
+0
-76
No files found.
application/config/aliases.php
View file @
a6d1449b
...
@@ -30,14 +30,12 @@ return array(
...
@@ -30,14 +30,12 @@ return array(
'Inflector'
=>
'System\\Inflector'
,
'Inflector'
=>
'System\\Inflector'
,
'Input'
=>
'System\\Input'
,
'Input'
=>
'System\\Input'
,
'Lang'
=>
'System\\Lang'
,
'Lang'
=>
'System\\Lang'
,
'Log'
=>
'System\\Log'
,
'URL'
=>
'System\\URL'
,
'URL'
=>
'System\\URL'
,
'Redirect'
=>
'System\\Redirect'
,
'Redirect'
=>
'System\\Redirect'
,
'Request'
=>
'System\\Request'
,
'Request'
=>
'System\\Request'
,
'Response'
=>
'System\\Response'
,
'Response'
=>
'System\\Response'
,
'Session'
=>
'System\\Session'
,
'Session'
=>
'System\\Session'
,
'Str'
=>
'System\\Str'
,
'Str'
=>
'System\\Str'
,
'Text'
=>
'System\\Text'
,
'Validator'
=>
'System\\Validator'
,
'Validator'
=>
'System\\Validator'
,
'View'
=>
'System\\View'
,
'View'
=>
'System\\View'
,
...
...
application/storage/log
s/.gitignore
→
application/storage/log
.txt
View file @
a6d1449b
File moved
system/log.php
deleted
100644 → 0
View file @
8053d8e9
<?php
namespace
System
;
class
Log
{
/**
* Write an info message to the log.
*
* @param string $message
* @return void
*/
public
static
function
info
(
$message
)
{
static
::
write
(
'Info'
,
$message
);
}
/**
* Write a debug message to the log.
*
* @param string $message
* @return void
*/
public
static
function
debug
(
$message
)
{
static
::
write
(
'Debug'
,
$message
);
}
/**
* Write an error message to the logs.
*
* @param string $message
* @return void
*/
public
static
function
error
(
$message
)
{
static
::
write
(
'Error'
,
$message
);
}
/**
* Write a message to the logs.
*
* @param string $type
* @param string $message
* @return void
*/
public
static
function
write
(
$type
,
$message
)
{
// Create the yearly and monthly directories if needed.
static
::
make_directory
(
$directory
=
APP_PATH
.
'storage/logs/'
.
date
(
'Y'
));
static
::
make_directory
(
$directory
.=
'/'
.
date
(
'm'
));
// Get the daily log file filename.
$file
=
$directory
.
'/'
.
date
(
'd'
)
.
EXT
;
file_put_contents
(
$file
,
date
(
'Y-m-d H:i:s'
)
.
' '
.
$type
.
' - '
.
$message
.
PHP_EOL
,
LOCK_EX
|
FILE_APPEND
);
chmod
(
$file
,
0666
);
}
/**
* Create a log directory.
*
* If the directory already exists, no action will be taken.
*
* @param string $directory
* @return void
*/
private
static
function
make_directory
(
$directory
)
{
if
(
!
is_dir
(
$directory
))
{
mkdir
(
$directory
,
02777
);
chmod
(
$directory
,
02777
);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment