This paper establishes a law-of-the-iterated-logarithm (LIL) version of the fundamental queueing formula L=λW: Under regularity conditions, the continuous-time arrival counting process and queue-length process jointly obey an LIL when the discrete-time sequence of interarrival times and waiting times jointly obey an LIL, and the limit sets are related. The standard relation L=λW appears as a corollary. LILs for inverse processes and random sums are also established, which are of general probabilistic interest because the usual independence, identical-distribution and moment assumptions are not made. Moreover, a LIL for regenerative process is established, which can be used to obtain the other LILs.