Log.ecl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*##############################################################################
  2. ## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®. All rights reserved.
  3. ############################################################################## */
  4. import lib_logging;
  5. RETURN MODULE
  6. /*
  7. * Outputs a line of debug logging to the program log file.
  8. *
  9. * @param text The text to be added to the log file.
  10. *
  11. * There is no return value - this is an action
  12. */
  13. EXPORT dbglog(string text) := lib_logging.Logging.dbglog(text);
  14. /*
  15. * Outputs an information entry to the current workunit.
  16. *
  17. * @param text The text to be added to the entry.
  18. * @param code An optional code to be associated with the entry.
  19. *
  20. * There is no return value - this is an action
  21. */
  22. EXPORT addWorkunitInformation(varstring text, unsigned code=0) := lib_logging.Logging.addWorkunitInformation(text, code);
  23. /*
  24. * Outputs a warning to the current workunit.
  25. *
  26. * @param text The text of the warning message.
  27. * @param code An optional warning code.
  28. *
  29. * There is no return value - this is an action
  30. */
  31. EXPORT addWorkunitWarning(varstring text, unsigned code=0) := lib_logging.Logging.addWorkunitWarning(text, code);
  32. /*
  33. * Outputs an error to the current workunit.
  34. *
  35. * @param text The text of the error message.
  36. * @param code An optional error code.
  37. *
  38. * There is no return value - this is an action
  39. */
  40. EXPORT addWorkunitError(varstring text, unsigned code=0) := lib_logging.Logging.addWorkunitError(text, code, 2);
  41. /*
  42. * Gets the Global Id associated with the current query or workunit.
  43. *
  44. * Returns the Global Id
  45. */
  46. EXPORT getGlobalId() := lib_logging.Logging.getGlobalId();
  47. /*
  48. * Gets the Caller Id associated with the current query or workunit.
  49. *
  50. * Returns the Caller Id
  51. */
  52. EXPORT getCallerId() := lib_logging.Logging.getCallerId();
  53. /*
  54. * Gets the Local Id associated with the current query or workunit.
  55. *
  56. * Returns the Local Id
  57. */
  58. EXPORT getLocalId() := lib_logging.Logging.getLocalId();
  59. /*
  60. * Generate a globally unique Id with base58 encoding.
  61. *
  62. * Returns the unique Id
  63. */
  64. EXPORT generateGloballyUniqueId() := lib_logging.Logging.generateGloballyUniqueId();
  65. END;