  We study the law of the iterated logarithm (LIL) for the maximum likelihood
estimation of the parameters (as a convex optimization problem) in the
generalized linear models with independent or weakly dependent ($\rho$-mixing,
$m$-dependent) responses under mild conditions. The LIL is useful to derive the
asymptotic bounds for the discrepancy between the empirical process of the
log-likelihood function and the true log-likelihood. As the application of the
LIL, the strong consistency of some penalized likelihood based model selection
criteria can be shown. Under some regularity conditions, the model selection
criterion will be helpful to select the simplest correct model almost surely
when the penalty term increases with model dimension and the penalty term has
an order higher than $O({\rm{loglog}}n)$ but lower than $O(n)$. Simulation
studies are implemented to verify the selection consistency of BIC.
