Personally
I would not write to a log file from a Customization. Because a Customization runs on the Client and under the users Windows Account, the user is at the mercy of having access and permissions to the Path you want to log to. If you can assure Terminal Users and non Local-Admins etc all have access good.
Also you will need to setup a Setting so you can read where to log to, you dont want to hard-code the Path. So maybe on Company Maintenance add a field called Company_UD.ClientSideLogPath_c – You can read the folder from the Agent Settings too, but typically in your Env they have a specific Folder they want to target.
but if you must then its just basic C# – theres no helper for client… C# StreamWriter Examples - Dot Net Perls
Client = Runs as users windows account… BPM = Runs as Server Service Account (executes server-side).
PS you could also write to Event Log if you need for Debugging Purposes:
Ice.Lib.Framework.EventLog.Current.WriteEntry("Hello World");
Ice.Lib.Framework.EventLog.Current.WriteEntry("Hello World", EventLogEntryType.Error);
Ice.Lib.Framework.EventLog.Current.WriteEntry("Hello World", EventLogEntryType.Warning);