log_console.c 369 B

1234567891011121314151617181920212223
  1. /*
  2. * Logging support
  3. *
  4. * Copyright (c) 2017 Google, Inc
  5. * Written by Simon Glass <sjg@chromium.org>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.h>
  10. #include <log.h>
  11. static int log_console_emit(struct log_device *ldev, struct log_rec *rec)
  12. {
  13. puts(rec->msg);
  14. return 0;
  15. }
  16. LOG_DRIVER(console) = {
  17. .name = "console",
  18. .emit = log_console_emit,
  19. };