[UE4]特定のカテゴリのログ以外をミュートする

# はじめに
なんかすごい勢いで誰かのログが垂れ流しになって自分のが見えないんですけど・・・
自分のは今調査中のこれだけ見れれば十分なのに！
みたいな事ってありますよね。
そんなときはとっても便利なコマンドがあります

#log xxx `only`

`only` これです。

実は`log`とだけ入力するとこんな感じでUsageがログに出力されます。
onlyというのが見えますね。

```
------- Log conventions
[cat]   = a category for the command to operate on, or 'global' for all categories.
[level] = verbosity level, one of: none, error, warning, display, log, verbose, all, default
At boot time, compiled in default is overridden by ini files setting, which is overridden by command line
------- Log console command usage
Log list            - list all log categories
Log list [string]   - list all log categories containing a substring
Log reset           - reset all log categories to their boot-time default
Log [cat]           - toggle the display of the category [cat]
Log [cat] off       - disable display of the category [cat]
Log [cat] on        - resume display of the category [cat]
Log [cat] only      - enables [cat] and disables all other categories
Log [cat] [level]   - set the verbosity level of the category [cat]
Log [cat] break     - toggle the debug break on display of the category [cat]
------- Log command line
-LogCmds="[arguments],[arguments]..."           - applies a list of console commands at boot time
-LogCmds="foo verbose, bar off"         - turns on the foo category and turns off the bar category
------- Environment variables
Any command line option can be set via the environment variable UE-CmdLineArgs
set UE-CmdLineArgs="-LogCmds=foo verbose breakon, bar off"
------- Config file
[Core.Log]
global=[default verbosity for things not listed later]
[cat]=[level]
foo=verbose break
```

#使用例

例えばこんな感じでCharacterMovementログを見たいのにブループリントのPrintStringがいっぱい出てきて困るみたいな場合を考えます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/464248/c9c689f0-ad0e-a9d0-6925-7b232ff9b9a8.png)

コンソールを開いて、
`log LogCharacterMovement Verbose`
`log LogCharacterMovement only`
と入力します。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/464248/d290b60d-aea2-4bec-c368-1de150185034.png)

見事に他のログが消えてくれました！

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/464248/24bafff7-2e73-c035-df5f-3d9fc751dcc0.png)

`log list Bl` / `log list Character` で確認してみると指定したもの以外がFatalレベルに設定されていることがわかります。

```
BlueprintAssertion                        Fatal         
LogAIBlueprint                            Fatal         
LogAnimationBlueprintLibrary              Fatal         
LogBlackboardEditor                       Fatal         
LogBlankProgram                           Fatal         
LogBlueprint                              Fatal         
LogBlueprintActionMenuItemFactory         Fatal         
LogBlueprintAPIGenerate                   Fatal         
LogBlueprintCodeGen                       Fatal         
LogBlueprintDebug                         Fatal         
LogBlueprintDebuggingView                 Fatal         
LogBlueprintDragDropMenuItem              Fatal         
LogBlueprintEditorPromotionTests          Fatal         
LogBlueprintFuncLibrary                   Fatal         
LogBlueprintInfoDump                      Fatal         
LogBlueprintNodeCache                     Fatal         
LogBlueprintSupport                       Fatal         
LogBlueprintUserMessages                  Fatal         
LogCompileAllBlueprintsCommandlet         Fatal         
LogCurveTable                             Fatal         
LogDataTable                              Fatal         
LogEditableMesh                           Fatal         
LogEditorUtilityBlueprint                 Fatal         
LogPortableObjectPipeline                 Fatal         
LogScriptDisassembler                     Fatal         
LogStatGroupEnableManager                 Fatal         
LogStreamableManager                      Fatal         
LogStringTable                            Fatal         
LogViewportBlueprintMenu                  Fatal         
LogCharacter                              Fatal         
LogCharacterAI                            Fatal         
LogCharacterMovement                      Verbose       
LogCharacterNetSmoothing                  Fatal         
LogPopulateDialogueWaveFromCharacterSheetCommandlet  Fatal   
```

ミュート設定を戻すときは `log reset` をどうぞ！