Re: [PATCH 3/3] logging: Make log regexp more compact (and readable)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/04/13 00:40, Jiri Denemark wrote:
---
  src/util/virlog.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 721c9bd..e31abb0 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -79,8 +79,8 @@ static int virLogEnd = 0;
  static regex_t *virLogRegex = NULL;
-#define VIR_LOG_DATE_REGEX "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]"
-#define VIR_LOG_TIME_REGEX "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9]\\+[0-9][0-9][0-9][0-9]"
+#define VIR_LOG_DATE_REGEX "[0-9]{4}-[0-9]{2}-[0-9]{2}"
+#define VIR_LOG_TIME_REGEX "[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}\\+[0-9]{4}"
  #define VIR_LOG_PID_REGEX "[0-9]+"
  #define VIR_LOG_LEVEL_REGEX "debug|info|warning|error"
ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]