Hi @Justin_B @zainali and Fellow Members,
Is there a way the log parser that’s processing the STDOUT and STDERR of the rendering process can check for the custom-defined RegEx pattern and choose to skip (not log/write) those matched lines into the task/render log files? And if so, how can we go about configuring this for our needs?
For instance, if the render log has lines that match with:
.*but MaterialBindingAPI is not applied on the prim
Not to log/write it in the task/render log files.
Please let me know if there are any questions.
Thanks,
Bhavik
Fractal Picture
Hello @Fractal_Admin
I have not tested it myself, but I think you can suppress a line by using this callback.
What are you trying to achieve here? I am asking, if the render is failing on it and it is printed as STDOUT then we can possibly stop is from failing on that line.
1 Like
Hi @zainali the goal is to skip logging/writing some specific and very copious verbosity information being written in the log files. For example,
2023-04-14 23:21:24: 0: STDOUT: Warning (secondary thread): in BindingsAtPrim at line 709 of K:\wkspaces\gafferDependencies\USD\working\USD-23.02\pxr\usd\usdShade\materialBindingAPI.cpp -- Found material bindings on prim at path (/flowerBed_grp/l_flowerBed_grp/l_flowerBed09_grp/fbBase02_geo) but MaterialBindingAPI is not applied on the prim
In some cases, we need to enable the debug
level in the logs but when that debug level spews some information that we know is not necessary to log/write in the log files, we want to skip those with the help of RegEx match. Thus, preventing unwanted information from being written in the log files yet capturing the debug verbosity information.
Hope that explains it and makes sense.
Please suggest how to do this.
Thanks,
Bhavik
Fractal Picture
1 Like
Thanks @zainali this seem to be working as expected.
DeadlineRepository10\custom\plugins\Gaffer\Gaffer.py
87: def InitializeProcess(self):
88: self.PluginType = PluginType.Simple
89: self.StdoutHandling = True
90:
91: # Suppress USD material bindings API warnings
92: self.AddStdoutHandlerCallback(".*K.*wkspaces.*materialBindingAPI\.cpp.*").HandleCallback += self.SupressCopiousLog
93:
94: # Suppress XGen Error No Camera messages
95: self.AddStdoutHandlerCallback(".*XGen Error.*No Camera.*").HandleCallback += self.SupressCopiousLog
96:
...
119:
120: def SupressCopiousLog(self):
121: self.SuppressThisLine()
122:
Thanks,
Bhavik
Fractal Picture
1 Like