ClientApi::SetProg( const StrPtr * )

Sets the application or script name for this connection.

Virtual?

No

 

Class

ClientApi

 

Arguments

const StrPtr *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;
StrBuf sb;
Error e;

sb.Set( "MyApp" );

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