LoggerMDC
LoggerMDC
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Methods summary
Modifier and Type | Method |
---|---|
public static | put ( string key , string value ) |
public static string | get ( string key ) |
public static array | getMap ( ) |
public static | remove ( string key ) |
public static | clear ( ) |
Methods in detail
-
put
public static put ( string key , string value )Stores a context value as identified with the key parameter into the context map.param
string key the keystring value the value -
get
string public static get ( string key )Returns the context value identified by the key parameter.param
string key The key.return
string -
getMap
array public static getMap ( )Returns the contex map as an array.return
array -
remove
public static remove ( string key )Removes the the context identified by the key parameter. Only affects user mappings, not $_ENV or $_SERVER.param
string key The key to be removed. -
clear
public static clear ( )Clears the mapped diagnostic context.