BuildOp using "Build" - how does one write a log m
Moderators: chulett, rschirm, roy
BuildOp using "Build" - how does one write a log m
I've been trying, without success, to write a message (either informational or warning) to the log file of a job calling the buildop. I can't find an example of a c++ call, either.
Has anyone actually written a buildop and done this? Which call did you use? All I can find are deprecated definitions and I can't even get those to work.
Has anyone actually written a buildop and done this? Which call did you use? All I can find are deprecated definitions and I can't even get those to work.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Sainath - could you please explain how this will write the equivalent of DSLogInfo() and DSLogWarn()? I did get output using
but haven't found a way to write a warning message to the log
Code: Select all
std::cout << "this is a message\n";
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
ArndW,
Are you saying that the solution works or not ?
You can try
Are you saying that the solution works or not ?
You can try
Code: Select all
std::cerr << "this is a warning message\n";
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Actually, it does work, just as using a PRINT in a before-job of a PX or in a job sequence will put the value in the log.
The standard out for informational messages will only issue one log entry per job run, though. I would like my routine to issue one or more distinct warning messages to the log and would need to use something else.
The apt_util\ErrorLog.h header file contains numerous definitions, but they all seem to be deprecated and I haven't been able to get any of the calls to work. This is most likely due to my lack of cpp skills and this is why I'm asking around for a working sample so that I can use that to expand on.
The standard out for informational messages will only issue one log entry per job run, though. I would like my routine to issue one or more distinct warning messages to the log and would need to use something else.
The apt_util\ErrorLog.h header file contains numerous definitions, but they all seem to be deprecated and I haven't been able to get any of the calls to work. This is most likely due to my lack of cpp skills and this is why I'm asking around for a working sample so that I can use that to expand on.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Yes, I have the std:cout working, but all of the messages I send there end up in a single log entry and I am looking for a method of writing discrete log entries.Sainath.Srinivasan wrote:ArndW,
Are you saying that the solution works or not ?
You can tryCode: Select all
std::cerr << "this is a warning message\n";
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>