Go to: Synopsis. Return value. Flags. Python examples.
commandLogging([historySize=uint], [logCommands=boolean], [logFile=string], [recordCommands=boolean], [resetLogFile=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
commandLogging is undoable, queryable, and NOT editable.
This command controls logging of Maya commands, in memory and on disk.Note that if commands are logged in memory, they will be available to the crash reporter and appear in crash logs.
None
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
historySize(hs)
|
uint
|
|
||
|
||||
logCommands(lc)
|
boolean
|
|
||
|
||||
logFile(lf)
|
string
|
|
||
|
||||
recordCommands(rc)
|
boolean
|
|
||
|
||||
resetLogFile(rl)
|
boolean
|
|
||
|
||||
import maya.cmds as cmds # Set the number of commands logged in memory to 20 # cmds.commandLogging( historySize=20 ) # Query the number of commands being logged in memory # cmds.commandLogging( q=True, historySize=True ) # Result: 20 # Query the log file location # cmds.commandLogging( q=True, logFile=True ) # Result: C:/Users/foobar/Documents/maya/mayaCommandLog.txt # Change the log file location # cmds.commandLogging( logFile='C:/temp/log.txt' ) # Reset the log file to default # cmds.commandLogging( resetLogFile=True )