blob: 5e9eef3324fe63c3d4836aa35974fc8724896cd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] [soft-commits] [6435] Added a first log viewer module.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B6435%5D%20Added%20a%20first%20log%20viewer%0A%09module.&In-Reply-To=%3C50A0BC24.70206%40gmail.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="019955.html">
<LINK REL="Next" HREF="019944.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.</H1>
<B>Guillaume Rousse</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B6435%5D%20Added%20a%20first%20log%20viewer%0A%09module.&In-Reply-To=%3C50A0BC24.70206%40gmail.com%3E"
TITLE="[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.">guillomovitch at gmail.com
</A><BR>
<I>Mon Nov 12 10:06:44 CET 2012</I>
<P><UL>
<LI>Previous message: <A HREF="019955.html">[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.
</A></li>
<LI>Next message: <A HREF="019944.html">[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#19942">[ date ]</a>
<a href="thread.html#19942">[ thread ]</a>
<a href="subject.html#19942">[ subject ]</a>
<a href="author.html#19942">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>I forgot this one...
Le 11/11/2012 19:13, <A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">root at mageia.org</A> a écrit :
><i> +## Append a custom string to log view adding date
</I>><i> +sub logText {
</I>><i> + my ($st) = @_;
</I>><i> + my $string = chomp_(`LC_ALL=C date '+%Y %b %d %T'`) . " " . $st . "\n";
</I>><i> + # `` return non utf8 and concat of non utf8 & utf8 is non utf8:
</I>><i> + c::set_tagged_utf8($string);
</I>><i> +
</I>><i> + # log given text
</I>><i> + $logView->appendLines($string);
</I>><i> +}
</I>It is especially ugly to call external date binary, whereas perl has
everything needed as builtin functions for this. See "time related
functions" in perlfunc(1), and POSIX::strftime in POSIX(3pm) if you need
a simple formation function.
--
BOFH excuse #66:
bit bucket overflow
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="019955.html">[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.
</A></li>
<LI>Next message: <A HREF="019944.html">[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#19942">[ date ]</a>
<a href="thread.html#19942">[ thread ]</a>
<a href="subject.html#19942">[ subject ]</a>
<a href="author.html#19942">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|