<commit_before>/*
 * Copyright 2018 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
package io.flutter.logging;

import com.intellij.openapi.components.*;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;

@State(name = "FlutterLogPreferences", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class FlutterLogPreferences implements PersistentStateComponent<FlutterLogPreferences> {
  private boolean showTimestamp = true;
  private boolean showSequenceNumbers = false;
  private boolean showLogLevel = true;
  private boolean showLogCategory = true;
  private boolean showColor = true;

  private int toolWindowLogLevel = FlutterLog.Level.NONE.value;
  private boolean toolWindowMatchCase = false;
  private boolean toolWindowRegex = false;

  public static FlutterLogPreferences getInstance(Project project) {
    return ServiceManager.getService(project, FlutterLogPreferences.class);
  }

  @Override
  public FlutterLogPreferences getState() {
    return this;
  }

  @Override
  public void loadState(@NotNull FlutterLogPreferences object) {
    XmlSerializerUtil.copyBean(object, this);
  }

  public boolean isShowTimestamp() {
    return showTimestamp;
  }<commit_msg>Update logger defaults (#2457) (#2465)<commit_after>/*
 * Copyright 2018 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
package io.flutter.logging;

import com.intellij.openapi.components.*;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;

@State(name = "FlutterLogPreferences", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
public class FlutterLogPreferences implements PersistentStateComponent<FlutterLogPreferences> {
  private boolean showTimestamp = false;
  private boolean showSequenceNumbers = false;
  private boolean showLogLevel = true;
  private boolean showLogCategory = true;
  private boolean showColor = false;

  private int toolWindowLogLevel = FlutterLog.Level.CONFIG.value;
  private boolean toolWindowMatchCase = false;
  private boolean toolWindowRegex = false;

  public static FlutterLogPreferences getInstance(Project project) {
    return ServiceManager.getService(project, FlutterLogPreferences.class);
  }

  @Override
  public FlutterLogPreferences getState() {
    return this;
  }

  @Override
  public void loadState(@NotNull FlutterLogPreferences object) {
    XmlSerializerUtil.copyBean(object, this);
  }

  public boolean isShowTimestamp() {
    return showTimestamp;
  }
{'fraction_non_alphanumeric': 0.07606745604592752, 'fraction_numerical': 0.0057409400789379264, 'mean_word_length': 5.237136465324385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4933058', 'n_tokens_mistral': 771, 'n_tokens_neox': 738, 'n_words': 216}