# Log_RegisterLogfile

> Registers any additional files that the upload process should parse for unwanted text and upload.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/log-registerlogfile/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

[VB Scripting Library](/capainstaller/vb-scripting-library/) > [OSD Scripting Library](/capainstaller/vb-scripting-library/osd-scripting-library/) > [Log functions (OSD)](/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/)

### Log_RegisterLogfile(sLogfile)

Registers any additional files that the upload process should parse for unwanted text and upload.

### Arguments

| ARGUMENT   | DESCRIPTION               | TYPE   |
|:-----------|:--------------------------|:-------|
| sLogfile   | The full path to the file | String |

### Return Type

Boolean, TRUE if function completed successfully.

### Remarks

Typpically used in the PreBootScript.wsf

### Example

The following example will do the following:

- Set the global variable gsLogServerFolder to a log share on the OSD server.
- Add a custom logfile is registered for submit along with the well-known logfiles.
- Register the product key as an unwanted text string that should be excluded from all files.
- Submit the logfiles.

**VBScript**

```vb
Private Function IncludeScript(sScriptFile)
 '...
End Function

'Begin
  bStatus=True
  If bStatus Then bStatus=IncludeScript("customlib.cis")
  If bStatus Then bStatus=IncludeLibrary("Capalib.cin")
  If bStatus Then bStatus=IncludeLibrary("Osdlib.cin")
  If bStatus Then bStatus=Job_Start("WS","Script Name","1.0","ScriptName.log","INSTALL")
  If bStatus Then bStatus=OSD_Initialize()
  
  gsLogServerFolder="\\" & gsBootServer & "\LogFiles"                          'set the log folder root
  sProductKey = "11111-22222-33333-44444-55555"
  If bStatus Then bStatus=Sysprep_SetProductKey(sProductKey)
  
  If bStatus Then bStatus=Log_RegisterExcludeValue("Product key",sProductKey)  'remove productkey value from logfiles
  If bStatus Then bStatus=Log_RegisterWellKnownFiles()
  If bStatus Then bStatus=Log_RegisterLogfile("X:\MyTestLog.log")               'register an aditional file to submit
  
  If bStatus Then bStatus=Log_SubmitLogs()                                     'submit the logs

  Job_End(bStatus)
'End main

```

### See Also

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/), [Log_RegisterExcludeValue](/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/log-registerexcludevalue/), [Log_RegisterWellKnownFiles](/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/log-registerwellknownfiles/), [Log_RemoveLogs](/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/log-removelogs/), [Log_SubmitLogs](/capainstaller/vb-scripting-library/osd-scripting-library/log-functions-osd/log-submitlogs/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
