ChocoLog.format.ps1xml
<?xml version="1.0" encoding="utf-8" ?> <Configuration> <ViewDefinitions> <View> <Name>Chocolatey Logs</Name> <ViewSelectedBy> <TypeName>ChocoLog</TypeName> </ViewSelectedBy> <TableControl> <TableHeaders> <TableColumnHeader> <Label>Time</Label> <Width>18</Width> </TableColumnHeader> <TableColumnHeader> <Label>Thread</Label> <Width>5</Width> </TableColumnHeader> <TableColumnHeader> <Label>Exit Code</Label> <Width>6</Width> </TableColumnHeader> <TableColumnHeader> <Label>Command Line</Label> </TableColumnHeader> <TableColumnHeader> <Label>Log Lines</Label> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <PropertyName>starttime</PropertyName> <FormatString>{0:MM/dd hh:mm:ss.fff}</FormatString> </TableColumnItem> <TableColumnItem> <PropertyName>thread</PropertyName> </TableColumnItem> <TableColumnItem> <ScriptBlock> $style = if ($_.exitCode -eq 0) { $PSStyle.Foreground.White } else { $PSStyle.Foreground.Yellow } [String]::Format("{0}{1}{2}", $bg, $_.exitCode, $PSStyle.Reset) </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> [String]::Format("{0}", ($_.cli -replace '"C:\\ProgramData\\chocolatey\\choco.exe"', 'choco')) </ScriptBlock> </TableColumnItem> <TableColumnItem> <PropertyName>logs</PropertyName> </TableColumnItem> </TableColumnItems> <Wrap/> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |