Package jason.stdlib
Class log
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.log
- All Implemented Interfaces:
InternalAction
,java.io.Serializable
@Manual(literal=".log(level,arg0[,arg1,...])", hint="used for logging messages", argsHint={"log level: severe, warning, info, fine, finer or finest (see java.util.logging)","the terms to be logged","the term to be concatenated with prior one [optional]"}, argsType={"term","term","term"}, examples=".log(info,\"Created artifact counter\"): prints to the log the referred message with level INFO.", seeAlso={"jason.stdlib.print","jason.stdlib.println"}) public class log extends DefaultInternalAction
Internal action: .log(level, args...)
.
Description: used for printing messages to the log
Examples:
-
.log(info,"Created artifact counter",N)
: prints to the log the referred message.
- See Also:
print
, Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private static InternalAction
singleton
-
Constructor Summary
Constructors Constructor Description log()
-
Method Summary
Modifier and Type Method Description protected void
checkArguments(Term[] args)
static InternalAction
create()
java.lang.Object
execute(TransitionSystem ts, Unifier un, Term[] args)
Executes the internal action.protected java.lang.String
getNewLine()
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, getMaxArgs, getMinArgs, prepareArguments, suspendIntention
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
singleton
-
-
Constructor Details
-
log
public log()
-
-
Method Details
-
create
-
getNewLine
protected java.lang.String getNewLine() -
checkArguments
- Overrides:
checkArguments
in classDefaultInternalAction
- Throws:
JasonException
-
execute
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.ExceptionDescription copied from interface:InternalAction
Executes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
java.lang.Exception
-