<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] Technical programming question (circular buffers & logging) -->
<!--X-From-R13: Pra Uerrne <terrneNploreuvtujnl.arg> -->
<!--X-Date: Thu, 15 Jul 1999 19:06:49 -0700 -->
<!--X-Message-Id: 378E8A34.97872526#cyberhighway,net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199907150435.WAA02423@ami-cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Technical programming question (circular buffers</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:greear#cyberhighway,net">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00921.html">Previous</a>
| <a href="msg00923.html">Next</a>
]
Thread:
[ <a href="msg00911.html">Previous</a>
| <a href="msg00917.html">Next</a>
]
Index:
[ <A HREF="author.html#00922">Author</A>
| <A HREF="#00922">Date</A>
| <A HREF="thread.html#00922">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Technical programming question (circular buffers & logging)</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Technical programming question (circular buffers & logging)</LI>
<LI><em>From</em>: Ben Greear <<A HREF="mailto:greear#cyberhighway,net">greear#cyberhighway,net</A>></LI>
<LI><em>Date</em>: Thu, 15 Jul 1999 18:26:12 -0700</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:greear#burrito,cyberhighway.net">greear#burrito,cyberhighway.net</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Chris Gray wrote:
>
> [Ben Greear:]
>
> > So, what I want to do is modify my logging class (basically just
> > an ofstream with some flags tacked on it). I was thinking about
> > making it a sort of ring-buffer where it just kept the last 50k
> > or some other nice round number.
>
> I've used that technique both in my MUD and at work. It works pretty well.
> Rather than getting complex and logging full text messages, however, we've
> tended to just log simpler things. My MUD just logs a pointer to a text
> message, and a single 32 bit value. If the system itself aborts, it
> dumps the contents of the ring out - it deferences the string pointers
> to get the actual text. I think there was an occasion at work where I
> needed to look at the buffer in a core dump, and it was a bit clumsy,
> but certainly doable.
Ok, got mine working pretty good. One problem though. I catch the SIGSEGV,
so there is no core file. Is there a way I can still get a core file as if
it was not caught (and still catch it?)
> Should work, as long as you rely on as little as possible in the dumping
> code. E.g. open the logging file with a low level 'open' call, write
> it out with no use of stdio, iostream, etc., then close it. That should
> minimize the amount of code/data you depend on, and reduce the likelihood
> of a nested SEGV.
Sound's like a good idea, but I'm going quick and dirty for now.. :)
--
Ben Greear (greear#cyberhighway,net) <A HREF="http://scry.wanfear.com/~greear">http://scry.wanfear.com/~greear</A>
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
<A HREF="http://scry.wanfear.com">http://scry.wanfear.com</A>
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
<A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00911" HREF="msg00911.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></STRONG>
<UL><LI><EM>From:</EM> Chris Gray <cg#ami-cg,GraySage.Edmonton.AB.CA></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00921.html">[MUD-Dev] fwd: forum on game design/culture</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00923.html">Re: [MUD-Dev] pfiles</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00911.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00917.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00922"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00922"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] an idea..wondering if this has been done</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00931" HREF="msg00931.html">Re: [MUD-Dev] an idea..wondering if this has been done</A></strong>,
bruce <a href="mailto:bruce#puremagic,com">bruce#puremagic,com</a>, Mon 19 Jul 1999, 16:47 GMT
</LI>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00901" HREF="msg00901.html">[MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Thu 15 Jul 1999, 02:34 GMT
<UL>
<LI><strong><A NAME="00914" HREF="msg00914.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Thu 15 Jul 1999, 22:05 GMT
</LI>
</UL>
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00911" HREF="msg00911.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 15 Jul 1999, 18:24 GMT
<UL>
<LI><strong><A NAME="00922" HREF="msg00922.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Fri 16 Jul 1999, 02:06 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00917" HREF="msg00917.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 16 Jul 1999, 00:42 GMT
<UL>
<LI><strong><A NAME="00927" HREF="msg00927.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Fri 16 Jul 1999, 19:05 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00926" HREF="msg00926.html">Re: [MUD-Dev] Technical programming question (circular buffers & logging)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 16 Jul 1999, 19:05 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00888" HREF="msg00888.html">[MUD-Dev] list of MUD platforms?</A></strong>,
Timothy O'Neill Dang <a href="mailto:timothy#nmia,com">timothy#nmia,com</a>, Wed 14 Jul 1999, 00:23 GMT
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>