📄 log.pm
字号:
# Copyright 2001-2005 Six Apart.# SCRiPTMAFiA 2005 - THE DiRTY HANDS ON YOUR SCRiPTS## $Id: Log.pm 10197 2005-03-09 00:27:57Z ezra $package MT::Log;use strict;use MT::Object;@MT::Log::ISA = qw( MT::Object );__PACKAGE__->install_properties({ columns => [ 'id', 'message', 'ip', ], indexes => { created_on => 1, }, datasource => 'log', audit => 1, primary_key => 'id',});1;__END__=head1 NAMEMT::Log - Movable Type activity log record=head1 SYNOPSIS use MT::Log; my $log = MT::Log->new; $log->message('This is a message in the activity log.'); $log->save or die $log->errstr;=head1 DESCRIPTIONAn I<MT::Log> object represents a record in the Movable Type activity log.=head1 USAGEAs a subclass of I<MT::Object>, I<MT::Log> inherits all of thedata-management and -storage methods from that class; thus you should lookat the I<MT::Object> documentation for details about creating a new object,loading an existing object, saving an object, etc.=head1 DATA ACCESS METHODSThe I<MT::Log> object holds the following pieces of data. These fields canbe accessed and set using the standard data access methods described in theI<MT::Object> documentation.=over 4=item * idThe numeric ID of the log record.=item * messageThe log entry.=item * ipThe IP address related with the message; this is useful, for example, whenthe message pertains to a failed login, to determine the IP address of theuser who attempted to log in.=item * created_onThe timestamp denoting when the log record was created, in the formatC<YYYYMMDDHHMMSS>. Note that the timestamp has already been adjusted for theselected timezone.=item * modified_onThe timestamp denoting when the log record was last modified, in the formatC<YYYYMMDDHHMMSS>. Note that the timestamp has already been adjusted for theselected timezone.=back=head1 DATA LOOKUPIn addition to numeric ID lookup, you can look up or sort records by anycombination of the following fields. See the I<load> documentation inI<MT::Object> for more information.=over 4=item * created_on=back=head1 AUTHOR & COPYRIGHTSPlease see the I<MT> manpage for author, copyright, and license information.=cut
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -