The CaptureLog is an old multi-dimensional interface and it was not used for capturing processing messages.
The output you see when running a json refresh command come from the SessionTrace events. The following is a short script showing how you can subscribe to the processing events and send it to the console with a Write-Host command - you should be able to alter this without too much trouble to send the output to a log file (or you could just redirect the console output to a file)
$serverName = "localhost\tab17"
$databaseName = "Adventure Works"
# load the TOM library
$ass = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.Tabular")
# declare the trace event handler
$handler_OnTraceEvent =
{
param([object]$sender, [Microsoft.AnalysisServices.Tabular.TraceEventArgs]$e)
write-host "$($e.EventClass) - $($e.EventSubclass) - $($e.TextData)"
}
# connect to the server
$server = [Microsoft.AnalysisServices.Tabular.Server]::new()
$server.Connect($serverName)
$trace = $server.SessionTrace
Register-ObjectEvent -InputObject $trace -EventName OnEvent -Action $handler_OnTraceEvent
$trace.Start()
# wait 5 seconds to let the trace start up
start-sleep -seconds 5
$db = $server.Databases.GetByName("Adventure Works")
$db.Model.RequestRefresh([Microsoft.AnalysisServices.Tabular.RefreshType]::Full)
$res = $db.Model.SaveChanges()
# output the results of the refresh operation (in case there are any errors)
$res.XmlaResults
#stop the trace and output the lastProcessed date for the database
$trace.Stop()
$db.refresh()
$db.LastProcessed