ClientApi::SetProg( const char * )

Sets the application or script name for this connection.

Virtual?

No

 

Class

ClientApi

 

Arguments

const char *c

the new program name

Returns

void

 

Notes

SetProg() sets the identity of a client application as reported by the p4 monitor command, or as recorded by server logging.

Call SetProg() before calling Init() to ensure that all p4 monitor entries show your program name, including those logged before you run any commands.

See also

ClientApi::SetVersion()

Example

The following example appears as MyApp in the output of p4 monitor show.

ClientApi client;
ClientUser ui;
Error e;

client.SetProg( "MyApp" );
client.Init( &e );
client.Run( "info", &ui );