27use UnexpectedValueException;
98 $level = Logger::DEBUG,
101 parent::__construct( $level, $bubble );
102 $this->uri = $stream;
111 throw new LogicException(
112 'Missing stream uri, the stream can not be opened.' );
117 if (
substr( $this->uri, 0, 4 ) ==
'udp:' ) {
119 if ( !
isset( $parsed[
'host'] ) ) {
120 throw new UnexpectedValueException(
sprintf(
121 'Udp transport "%s" must specify a host', $this->uri
124 if ( !
isset( $parsed[
'port'] ) ) {
125 throw new UnexpectedValueException(
sprintf(
126 'Udp transport "%s" must specify a port', $this->uri
130 $this->host = $parsed[
'host'];
131 $this->port = $parsed[
'port'];
134 if (
isset( $parsed[
'path'] ) ) {
135 $this->prefix =
ltrim( $parsed[
'path'],
'/' );
138 if (
filter_var( $this->host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
148 $this->sink =
fopen( $this->uri,
'a' );
154 throw new UnexpectedValueException(
sprintf(
155 'The stream or file "%s" could not be opened: %s',
156 $this->uri, $this->error
175 return $this->host !==
null;
179 if ( $this->useLegacyFilter &&
181 $record[
'channel'], $record[
'message'],
182 $record[
'level'], $record
191 if ( $this->sink ===
null ) {
195 $text = (
string)$record[
'formatted'];
198 if ( $this->prefix !==
'' ) {
199 $leader = ( $this->prefix ===
'{channel}' ) ?
204 if (
strlen( $text ) > 65506 ) {
205 $text =
substr( $text, 0, 65506 );
208 if (
substr( $text, -1 ) !=
"\n" ) {
213 $text =
substr( $text, 0, 65507 );
217 $this->sink, $text,
strlen( $text ), 0, $this->host, $this->port
221 fwrite( $this->sink, $text );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))