Class ScriptFile
- java.lang.Object
-
- org.apache.logging.log4j.core.script.AbstractScript
-
- org.apache.logging.log4j.core.script.ScriptFile
-
@Plugin(name="ScriptFile", category="Core", printObject=true) public class ScriptFile extends AbstractScript
Container for the language and body of a script file along with the file location.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.Path
filePath
private boolean
isWatched
-
Fields inherited from class org.apache.logging.log4j.core.script.AbstractScript
DEFAULT_LANGUAGE, LOGGER
-
-
Constructor Summary
Constructors Constructor Description ScriptFile(java.lang.String name, java.nio.file.Path filePath, java.lang.String language, boolean isWatched, java.lang.String scriptText)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScriptFile
createScript(java.lang.String name, java.lang.String language, java.lang.String filePathOrUri, java.lang.Boolean isWatched, java.nio.charset.Charset charset)
java.nio.file.Path
getPath()
boolean
isWatched()
java.lang.String
toString()
-
Methods inherited from class org.apache.logging.log4j.core.script.AbstractScript
getLanguage, getName, getScriptText
-
-
-
-
Method Detail
-
getPath
public java.nio.file.Path getPath()
-
isWatched
public boolean isWatched()
-
createScript
@PluginFactory public static ScriptFile createScript(@PluginAttribute("name") java.lang.String name, @PluginAttribute("language") java.lang.String language, @PluginAttribute("path") java.lang.String filePathOrUri, @PluginAttribute("isWatched") java.lang.Boolean isWatched, @PluginAttribute("charset") java.nio.charset.Charset charset)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-